<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <title>分类管理</title>
    <link type="text/css" rel="stylesheet" href="http://localhost/program/Static/hdjs/hdui.css"/>
    <script type="text/javascript" src="http://localhost/program/Static/jquery/jquery-1.7.2.min.js"></script>


    <script type="text/javascript">
        var CONTROLLER = "http://localhost/program/index.php/Admin/Category";
        //删除分类确认框
        function del(){
            var msg='确定删除么？';
            if (confirm(msg)==true) {
                return true;
            }else{
                return false;
            }
        }
    </script>
    <script type="text/javascript" src="http://localhost/program/Application/Admin/View/Category/js/js.js"></script>
    <link type="text/css" rel="stylesheet" href="http://localhost/program/Static/bootstrap/css/bootstrap.min.css"/>


</head>
<body>
<div class="wrap">
    <table class="table2">
        <thead>
        <tr class="tt">             
            <a href="<?php echo U('Category/add');?>" class="btn btn-info btn-xs"><span class="glyphicon glyphicon-plus-sign"></span>添加顶级分类</a>                    
        </tr>
        <tr pid=0>
            <td width="30"></td>
            <td>分类id</td>
            <td>分类名称</td>
            <td>所属类型</td>
            
            <td>分类标题</td>
            <td>分类排序</td>     
            <!-- <td>是否显示</td> -->
            <td width="200">操作</td>
        </tr>
        </thead>
        <tbody>
            <?php foreach ($data as $k=>$v){?>
            <tr pid=<?php echo $v['pid'];?> cid=<?php echo $v['cid'];?>>
                    <td width="30">
                        <a href="javascript:;" class="glyphicon glyphicon-plus a-plus     <?php if(isset($v['_end'])){ ?>glyphicon-minus<?php } ?>" cid="<?php echo $v['cid'];?>"></a>
                    </td>
                    <td><?php echo $v['cid'];?></td>                    
                    <td><?php echo $v['cname'];?></td>
                    <td><?php echo $v['type_name'];?></td>
                    <td><?php echo $v['ctitle'];?></td>
                    <td><?php echo $v['csort'];?></td>
                    
                    <!-- <td>
                            <?php if($v['is_show']){ ?>
                            <span class="glyphicon glyphicon-ok"></span>
                        <?php }else{ ?>
                            <span class="glyphicon glyphicon-remove"></span>
                        <?php } ?>
                    </td> -->
                    <td width="200">
                        <a href="<?php echo U('Category/add_son',array('cid'=>$v['cid'],'type_id'=>$v['type_id']));?>" class="btn btn-primary btn-xs">添加子分类</a>
                        <a href="<?php echo U('Category/edit_cate',array('cid'=>$v['cid'],'pid'=>$v['pid']));?>" class="btn btn-info btn-xs">修改</a>
                        <a href="<?php echo U('Category/del_cate',array('cid'=>$v['cid']));?> " onclick='javascript:return del()'class="btn btn-danger btn-xs">删除</a>
                    </td>
                </tr>
            
            </tr>
            <?php }?>
        </tbody>
    </table>
    <div class="page_hdjob">
        
    </div>
</div>

</body>
</html>


